Optimal. Leaf size=73 \[ \frac{a^4 \tan ^3(c+d x)}{3 d}+\frac{7 a^4 \tan (c+d x)}{d}+\frac{6 a^4 \tanh ^{-1}(\sin (c+d x))}{d}+\frac{2 a^4 \tan (c+d x) \sec (c+d x)}{d}+a^4 x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0956729, antiderivative size = 73, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 5, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.238, Rules used = {2757, 3770, 3767, 8, 3768} \[ \frac{a^4 \tan ^3(c+d x)}{3 d}+\frac{7 a^4 \tan (c+d x)}{d}+\frac{6 a^4 \tanh ^{-1}(\sin (c+d x))}{d}+\frac{2 a^4 \tan (c+d x) \sec (c+d x)}{d}+a^4 x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2757
Rule 3770
Rule 3767
Rule 8
Rule 3768
Rubi steps
\begin{align*} \int (a+a \cos (c+d x))^4 \sec ^4(c+d x) \, dx &=\int \left (a^4+4 a^4 \sec (c+d x)+6 a^4 \sec ^2(c+d x)+4 a^4 \sec ^3(c+d x)+a^4 \sec ^4(c+d x)\right ) \, dx\\ &=a^4 x+a^4 \int \sec ^4(c+d x) \, dx+\left (4 a^4\right ) \int \sec (c+d x) \, dx+\left (4 a^4\right ) \int \sec ^3(c+d x) \, dx+\left (6 a^4\right ) \int \sec ^2(c+d x) \, dx\\ &=a^4 x+\frac{4 a^4 \tanh ^{-1}(\sin (c+d x))}{d}+\frac{2 a^4 \sec (c+d x) \tan (c+d x)}{d}+\left (2 a^4\right ) \int \sec (c+d x) \, dx-\frac{a^4 \operatorname{Subst}\left (\int \left (1+x^2\right ) \, dx,x,-\tan (c+d x)\right )}{d}-\frac{\left (6 a^4\right ) \operatorname{Subst}(\int 1 \, dx,x,-\tan (c+d x))}{d}\\ &=a^4 x+\frac{6 a^4 \tanh ^{-1}(\sin (c+d x))}{d}+\frac{7 a^4 \tan (c+d x)}{d}+\frac{2 a^4 \sec (c+d x) \tan (c+d x)}{d}+\frac{a^4 \tan ^3(c+d x)}{3 d}\\ \end{align*}
Mathematica [A] time = 0.0327334, size = 61, normalized size = 0.84 \[ a^4 \left (\frac{\tan ^3(c+d x)}{3 d}+\frac{7 \tan (c+d x)}{d}+\frac{6 \tanh ^{-1}(\sin (c+d x))}{d}+\frac{2 \tan (c+d x) \sec (c+d x)}{d}+x\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.09, size = 93, normalized size = 1.3 \begin{align*}{a}^{4}x+{\frac{{a}^{4}c}{d}}+6\,{\frac{{a}^{4}\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{d}}+{\frac{20\,{a}^{4}\tan \left ( dx+c \right ) }{3\,d}}+2\,{\frac{{a}^{4}\sec \left ( dx+c \right ) \tan \left ( dx+c \right ) }{d}}+{\frac{{a}^{4}\tan \left ( dx+c \right ) \left ( \sec \left ( dx+c \right ) \right ) ^{2}}{3\,d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.13387, size = 162, normalized size = 2.22 \begin{align*} \frac{{\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} a^{4} + 3 \,{\left (d x + c\right )} a^{4} - 3 \, a^{4}{\left (\frac{2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 6 \, a^{4}{\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 18 \, a^{4} \tan \left (d x + c\right )}{3 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.013, size = 281, normalized size = 3.85 \begin{align*} \frac{3 \, a^{4} d x \cos \left (d x + c\right )^{3} + 9 \, a^{4} \cos \left (d x + c\right )^{3} \log \left (\sin \left (d x + c\right ) + 1\right ) - 9 \, a^{4} \cos \left (d x + c\right )^{3} \log \left (-\sin \left (d x + c\right ) + 1\right ) +{\left (20 \, a^{4} \cos \left (d x + c\right )^{2} + 6 \, a^{4} \cos \left (d x + c\right ) + a^{4}\right )} \sin \left (d x + c\right )}{3 \, d \cos \left (d x + c\right )^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.45785, size = 157, normalized size = 2.15 \begin{align*} \frac{3 \,{\left (d x + c\right )} a^{4} + 18 \, a^{4} \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1 \right |}\right ) - 18 \, a^{4} \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right ) - \frac{2 \,{\left (15 \, a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} - 38 \, a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 27 \, a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 1\right )}^{3}}}{3 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]